package org.stvd.entities.logs;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;
import org.stvd.entities.base.BaseEntity;

/**
 * @Title: SysLoginInfo
 * @Description: 系统访问记录表
 * @author houzx
 * @date 2020年9月2日
 */
@Entity
@Table(name="sys_login_info")
public class SysLoginInfo extends BaseEntity{
    
    private static final long serialVersionUID = 1L;

    /** ID */
    @Id
    @Column(name="info_id", nullable = false)
    private Long infoId = null;

    /** 用户账号 */
    @Column(name="user_name")
    private String userName = "";

    /** 登录状态 0成功 1失败 */
    @Column(name="status")
    private String status = "";

    /** 登录IP地址 */
    @Column(name="ipaddr")
    private String ipaddr = "";

    /** 登录地点 */
    @Column(name="login_location")
    private String loginLocation = "";

    /** 浏览器类型 */
    @Column(name="browser")
    private String browser = "";

    /** 操作系统 */
    @Column(name="os")
    private String os = "";

    /** 提示消息 */
    @Column(name="msg")
    private String msg = "";

    /** 访问时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name="login_time")
    private Date loginTime = null;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Transient
    private Date queryStartDate = null;
    
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Transient
    private Date queryEndDate = null;
    
    public Long getInfoId() {
        return infoId;
    }

    public void setInfoId(Long infoId) {
        this.infoId = infoId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIpaddr() {
        return ipaddr;
    }

    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
    }

    public String getLoginLocation() {
        return loginLocation;
    }

    public void setLoginLocation(String loginLocation) {
        this.loginLocation = loginLocation;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Date getQueryStartDate() {
        return queryStartDate;
    }

    public void setQueryStartDate(Date queryStartDate) {
        this.queryStartDate = queryStartDate;
    }

    public Date getQueryEndDate() {
        return queryEndDate;
    }

    public void setQueryEndDate(Date queryEndDate) {
        this.queryEndDate = queryEndDate;
    }
}